<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/

$route['default_controller'] 								= 	"client/home";
$route['404_override'] 										= 	'client/error_404';

$route['acp_admin'] 										= 	'admin/home';
$route['acp_admin/(:any)?'] 								= 	'admin/$1';

$route['([\d]+)']                                           = 	"client/home/index/$1";

$route['lien-he']                                           =   'client/contact/index';
$route['y-kien-khach-hang']                                           =   'client/contact/index';

//Gioi thieu
$route['gioi-thieu-ve-cong-ty/([\w\-]+).html']				=	'client/articles/intro_detail/$1';
$route['gioi-thieu-ve-cong-ty|gioi-thieu']				    =	'client/articles/intro_index';

//Tin tuc
$route['tin-tuc']                                           =   'client/articles/news_index';
$route['dang-ky/([\w\-]+).html']							=	'client/course/register/$1';

//Thu vien
$route['thu-vien/anh/([\w\-]+)/([\w\-]+)']                  =   'client/libraries/img/$1/$2';
$route['thu-vien/anh/([\w\-]+)']                            =   'client/libraries/img/$1';
$route['thu-vien/video/([\w\-]+)/([\w\-]+)']                =   'client/libraries/video/$1/$2';
$route['thu-vien/video/([\w\-]+)']                          =   'client/libraries/video/$1';
$route['thu-vien']                                          =   'client/libraries/index';

//San pham
$route['san-pham/([\w\-]+)/([\w\-]+)']                      =   'client/products/view/$1';
$route['san-pham/([\w\-]+)']                                =   'client/products/view/$1';
$route['san-pham']                                          =   'client/products/index';

//Lich khai giang
$route['lich-khai-giang/([\d]+)/([\d]+)/([\d]+)']			=	'client/calendar/index/$1/$2/$3';
$route['lich-khai-giang/([\d]+)/([\d]+)']					=	'client/calendar/index/$1/$2';

//

$route['cata/([\w\-]+)']                                    =   'client/home/cata/$1';
$route['cata/([\w\-]+)/([\d]+)']                            =   'client/home/cata/$1/$2';

$route['phan-loai/([\w\-]+)']                                    =   'client/home/type/$1';
$route['phan-loai/([\w\-]+)/([\d]+)']                            =   'client/home/type/$1/$2';

$route['search/([\w]+)/([\d]+)']                            =   'client/search/index/$1/$2';
$route['search/([\w]+)']                                    =   'client/stores/search/$1';
$route['show-room']											=	'client/stores/index';
$route['show-room/([a-z0-9\-]+)']							=	'client/stores/index/$1';

$route['show-room/price_max/([a-z0-9\-]+).html']			=	'client/stores/filter_price/$1';
$route['show-room/price_max/([a-z0-9\-]+)']					=	'client/stores/filter_price/$1/1';
$route['show-room/price_max/([a-z0-9\-]+)/([a-z0-9\-]+)']	=	'client/stores/filter_price/$1/$2';
$route['show-room/price_filter/([a-z0-9\-]+)/([a-z0-9\-]+)']=	'client/stores/filter_price/$1/$2';


$route['show-room/company/([a-z0-9\-]+).html']				=	'client/stores/filter_company/$1';
$route['show-room/company/([a-z0-9\-]+)']					=	'client/stores/filter_company/$1/1';
$route['show-room/company/([a-z0-9\-]+)/([a-z0-9\-]+)']		=	'client/stores/filter_company/$1/$2';

$route['show-room/su-dung/([a-z0-9\-]+).html']				=	'client/stores/filter_utilities/$1';
$route['show-room/su-dung/([a-z0-9\-]+)']					=	'client/stores/filter_utilities/$1/1';
$route['show-room/su-dung/([a-z0-9\-]+)/([a-z0-9\-]+)']		=	'client/stores/filter_utilities/$1/$2';

$route['show-room/power/([a-z0-9\-]+).html']				=	'client/stores/filter_power/$1';
$route['show-room/power/([a-z0-9\-]+)']						=	'client/stores/filter_power/$1/1';
$route['show-room/power/([a-z0-9\-]+)/([a-z0-9\-]+)']		=	'client/stores/filter_power/$1/$2';

$route['show-room/search-products/(:any)']								= 	'client/stores/search/$1';

$route['show-room/detail/([a-z0-9\-]+)/([a-z0-9\-]+).html']				=	'client/stores/detail/$1/$2';

$route['tu-van-hoi-dap']												= 	'client/questions/index';
$route['tu-van-hoi-dap/(0-9\-]+)']										= 	'client/questions/index/$1';
$route['tu-van-hoi-dap/detail/([a-z0-9\-]+)/([a-z0-9\-]+).html']		= 	'client/questions/detail/$1/$2';
$route['tu-van-hoi-dap/dat-cau-hoi']									= 	'client/questions/send_questions';
$route['tu-van-hoi-dap/tim-kiem/(:any)']								= 	'client/questions/search_questions/$1';


$route['tin-tuc/?']											= 	'client/articles/index';
$route['tin-tuc/([0-9\-]+)']									= 	'client/articles/index/$1';
$route['tin-tuc/detail/([a-z0-9\-]+)/([a-z0-9\-]+).html']		= 	'client/articles/detail/$1/$2';
$route['tin-tuc/search-news/(:any)']							= 	'client/articles/search/$1';


$route['dat-hang']												= 	'client/booking/index';
$route['dat-hang/dat-hang']										= 	'client/booking/buyproducts';
$route['dat-hang/dat-hang/(:any)']								= 	'client/booking/buyproducts/$1';
$route['dat-hang/lien-he']										= 	'client/booking/contacts';

$route['gioi-thieu.html']												= 	'client/html/index';
$route['ho-tro-su-dung.html']											= 	'client/html/hotro';
$route['thong-tin-lien-he.html']										= 	'client/html/lienhe';

$route['tuyen-dung']													= 	'client/recruitment/index';
$route['tuyen-dung/([a-z0-9\-]+)']										= 	'client/recruitment/index/$1';
$route['tuyen-dung/detail/([a-z0-9\-]+)/([a-z0-9\-]+).html']			= 	'client/recruitment/detail/$1/$2';

$route['khach-hang-noi-ve-chung-toi']									= 	'client/reviews/index/1';
$route['khach-hang-noi-ve-chung-toi/([0-9\-]+)']						= 	'client/reviews/index/$1';
$route['khach-hang-noi-ve-chung-toi/gui-y-kien']						= 	'client/reviews/send_notes';

$route['huong-dan-mua-hang.html']										= 	'client/html/huongdan';

$route['download/([a-z0-9]+)/([a-z0-9\-]+)']         					=  'client/home/download_file/$1/$2';

$route['received_letter.html']						 = 	'client/home/received_letter';
$route['received_letter/success.html']				 = 	'client/home/received_letter_success';
$route['received_letter/error.html']				 = 	'client/home/received_letter_error';

/* End of file routes.php */
/* Location: ./application/config/routes.php */
